<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.neusoft.com/taglib/cutpage" prefix="page"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script language="javascript" src="${pageContext.request.contextPath}/js/back_test.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/back.css" />
<script type="text/javascript">
<!--
	function check(res){
	
	if(res==2){
		document.getElementById("re").style.display="none";
	}else{
		document.getElementById("re").style.display="block";
	}
}
//-->
</script>
<center>
	<span>订单详情</span>
<form action="OrderServlet?service=commit" method="post">
	<table width="1050px" border="1" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#0066cc">
		<tr>
			<td colspan="10">
				<table>
					<tr>
						<td colspan="2">用户信息</td>
					</tr>
					<tr>
						<td style="padding-left: 20px;">订单编号：${order.orderId}</td>
					</tr>
					<tr>
						<td style="padding-left: 20px;">用户名：${order.userName}</td>
					</tr>
					<tr>
						<td style="padding-left: 20px;">用户联系电话：${order.phone}</td>
					</tr>
					<tr>
						<td style="padding-left: 20px;">用户邮箱：${user.email}</td>
					</tr>
					<tr>
						<td colspan="2">收件人信息</td>
					</tr>
					<tr>
						<td style="padding-left: 20px;">收件人姓名：${order.toUser}</td>
					</tr>
					<tr>
						<td style="padding-left: 20px;">收件人联系电话：${order.toPhone}</td>
					</tr>
					<tr>
						<td style="padding-left: 20px;">收件人地址：${order.toAddress}</td>
					</tr>
					<tr>
						<td style="padding-left: 20px;">收件人邮编：${order.toPostCode}</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td colspan="10" align="center">
				订单明细：
			</td>
		</tr>
		<tr bgcolor="#AEC8E4" height="40px">
			<th width="100px">品牌</th>
			<th width="100px">类别</th>
			<th width="100px">名称</th>
			<th width="50px">价格</th>
			<th width="50px">库存量</th>
			<th width="200px">描述</th>
			<th width="100px">图片预览</th>
			<th width="100px">购买数量</th>
			<th width="100px">金额</th>
		</tr>
			<c:forEach items="${orderinfolist}" var="orderinfo">
				<c:forEach items="${goodslist}" var="goods">
					<c:if test="${orderinfo.goodsId==goods.goodsId}">
					<tr height="40px;" align="center">
						<td>${goods.goodsType_name}</td>
						<td>${goods.smallType_name}</td>
						<td>${goods.goodsName}</td>
						<td>${goods.price}</td>
						<td>${goods.num}</td>
						<td>${goods.direction}</td>
						<td>
							<img src="${pageContext.request.contextPath}/images/jiantou.gif" onmousemove="quickalt();" onmouseover="getalt('${pageContext.request.contextPath}/img/${goods.picPath}');" onmouseout="restorealt();" />
						</td>
						<td>${orderinfo.goodsNum}</td>
						<td>${orderinfo.price}</td>
					</tr>
					</c:if>
			</c:forEach>
		</c:forEach>
	</table>
	<table>
		<tr>
			<td>
				订单审核：
			</td>
			<td>
				<select name="result" onchange="check(this.value)">
					<option value="2">通过审核</option>
					<option value="0">审核失败</option>
				</select>
				<input type="hidden" name="orderId" value="${order.orderId}">
			</td>
		</tr>
		<tr id="re" style="display: none">
			<td>
				未通过审核原因：
			</td>
			<td>
				<textarea rows="3" name="reson"></textarea>
			</td>
		</tr>
		<tr>
			<td align="center">
				<input type="submit" value="提交">
			</td>
		</tr>
	</table>
</form>
<div style="display:none;border:1px solid #0066cc;position:absolute;" id="_altlayer">
</div>
</center>